<template>
  <z-collapse v-model:activeKey="actkey" :accordion="true" @change="logkey">
    <z-collapse-panel key="1" header="这是panel 1">
      <h1>哈哈panel1</h1>
    </z-collapse-panel>
    <z-collapse-panel key="2" header="这是panel 2">
      <h1>哈哈panel2</h1>
    </z-collapse-panel>
    <z-collapse-panel key="3" header="这是panel 3">
      <h1>哈哈panel3</h1>
    </z-collapse-panel>
  </z-collapse>
</template>
<script>
import { defineComponent, ref } from 'vue'

export default defineComponent({
  name: 'CollapseDemo1',
  setup(){
    const actkey = ref('2')
    const logkey = (k)=>{
      console.log('logkey', k); 
      actkey.value = k
    }
    return {
        actkey,
        logkey
    }
  }
})
</script>
